package com.lst.projectlib.config;

import android.app.Application;

import com.lst.projectlib.util.MyCrashHandler;
import com.lst.projectlib.util.UniversalImageLoader;

import me.nereo.multi_image_selector.MultiImageConfig;
import me.nereo.multi_image_selector.SMultiImageSelector;

/**
 * Created by Administrator on 2017/2/9.
 */

public class BaseAppconfig extends Application {
    public static BaseAppconfig instance;

    /**
     * 经纬度坐标
     */
    public static String mLongitude = "0";
    public static String mLatitude = "0";
    public static String mLocAddress = "";

    @Override
    public void onCreate() {
        super.onCreate();
        instance = this;

        //初始化图片选择器
        SMultiImageSelector.init(new MultiImageConfig.Builder().setAppContext(this)
                .setImageLoader(new UniversalImageLoader(this)).build());

    }

    protected void initCrashHandler(String logPath){
        // 全局捕获异常
		MyCrashHandler handler = MyCrashHandler.getInstance();
		handler.init(this,logPath);
		Thread.setDefaultUncaughtExceptionHandler(handler);
    }
}
